<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正则</title>
</head>
<body>
    <script>
        const password = "123469";
        let reg = /^\d{6}$/
        console.log("password",reg.test(password))

        const email = "jack.ac@qq.com"
        reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*.\w+([-.]\w+)*$/;
        console.log("email",reg.test(email))

        const date = "19990-2-20"
        reg = /^\d{4}-\d{1,2}-\d{1,2}$/
        console.log("date",reg.test(date))
    </script>
</body>
</html>